package lab03.test01;

import java.io.BufferedWriter;
import java.io.FileWriter;
import java.io.IOException;

/**
 * Created by Administrator on 2017-11-15.
 */
public class WriterTest {

    public static void main(String[] args) {


        // 字符流写文件
        BufferedWriter writer = null;
        try {
            writer = new BufferedWriter(new FileWriter("E:\\1.txt"));


            writer.write("hello, sctu!!!");
            writer.newLine();

            writer.write("101010010010010");
            writer.newLine();

            writer.write(63);

        } catch (IOException e) {
            e.printStackTrace();
        } finally {

            try {
                writer.close();
            } catch (IOException e) {
                e.printStackTrace();
            }

        }
    }
}
